package cn.fl.capital.service;

import cn.fl.capital.condition.CapPrjRuleRQueryCondition;
import cn.fl.capital.vo.CapAdvRuleInfoVO;
import cn.fl.capital.condition.CapAdvRuleInfoQueryCondition;
import cn.fl.capital.condition.CapPrjRuleRQueryCondition;
import cn.fl.capital.dto.CapAdvRuleInfoDTO;
import cn.fl.capital.dto.CapPrjRuleRDTO;
import cmm.mid.core.framework.dto.DataResultDTO;
import cmm.mid.core.framework.page.DataResultVO;
import cmm.mid.core.framework.page.KeyValueVO;
import cmm.mid.core.framework.page.Pager;
import cn.cmm.base.framework.exception.BaseException;
import cn.cmm.base.framework.constant.BaseExceptionConstant;
import cn.fl.capital.vo.CapPrjRuleRVO;

import java.util.List;

/**
 * @Description: 垫款业务规则表 客户端服务层接口
 * 业务层方法名称前缀：
 * 新增：add*
 * 删除：remove*
 * 修改：modify*
 * 批量：batch*
 * 查询对象：select* get*
 * 查询集合：search*
 */
public interface ICapAdvRuleInfoService {
	
	/**
	 * 获取唯一对象
	 * @param id 主键
	 * @return 对象DTO
	 */
	public CapAdvRuleInfoVO selectById(Long id) throws BaseException;
	
	/**
	 * 新增
	 * @param entity
	 * @return
	 */
    public Long add(CapAdvRuleInfoVO entity) throws BaseException;
    
    /**
     * 批量删除
     * @param ids
     * @return
     */
    public boolean removeByIds(List<Long> ids) throws BaseException;

    /**
     * 修改
     * @param entity
     * @return
     */
    public boolean modify(CapAdvRuleInfoVO entity) throws BaseException;

    /**
     * 分页查询所有
     * @param page
     * @return
     */
    public Pager searchListPage(Pager page) throws BaseException;
    
    /**
     * 根据条件查询所有
     * @param condition
     * @return
     */
    public List<CapAdvRuleInfoVO> searchList(CapAdvRuleInfoQueryCondition condition) throws BaseException;
    
    /**
     * 查询*数据字典
     * @param groupCd 组代码
     * @return List<KeyValueVO>
     */
    public List<KeyValueVO> searchCdList(String groupCd);

    /**
     * 添加或修改垫款规则项目中间表接口
     * @param capPrjRuleRDTO
     * @return
     * @throws BaseException
     */
    public DataResultDTO addAndModifyCapPrjRuleR(CapPrjRuleRDTO capPrjRuleRDTO) throws BaseException ;

    /**
     * 通过融资项目ID查询该项目的规则名称
     * @param condition
     * @return
     * @throws BaseException
     */
    public List<CapAdvRuleInfoDTO> selectAdvRuleInfoByPrjId(CapPrjRuleRQueryCondition condition) throws BaseException ;


    /**
     * 手动新增垫款规则
     * @param entity
     * @param dataList
     * @return
     */
    public Long addRuleInfoByManual(CapAdvRuleInfoVO entity,List dataList,Long crtUsrId) throws BaseException;

    /**
     * 通过关联表条件查询符合条件的中间表信息
     * @param condition
     * @return
     */
    public List<CapPrjRuleRVO>  selectCapPrjRuleRList(CapPrjRuleRQueryCondition condition)throws BaseException;

    
}
